<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8" lang="zh-cn"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content="studyDemo"/>
    <meta name="author" content="studylw"/>
    <link rel="icon" href="../../static/img/favicon.ico" th:href="@{/img/favicon.ico}"/>

    <title>用户登录</title>

    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="../../static/plugins/bootstrap/css/bootstrap.css"
          th:href="@{/plugins/bootstrap/css/bootstrap.css}"/>

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link rel="stylesheet" href="../../static/plugins/css/ie10-viewport-bug-workaround.css"
          th:href="@{/plugins/css/ie10-viewport-bug-workaround.css}"/>

    <!-- Custom styles for this template -->
    <link rel="stylesheet" href="../../static/css/signin.css" th:href="@{/css/signin.css}"/>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../../static/plugins/js/html5shiv.min.js"
            th:src="@{/plugins/js/html5shiv.min.js}"></script>
    <script type="text/javascript" src="../../static/plugins/js/respond.min.js"
            th:src="@{/plugins/js/respond.min.js}"></script>
    <![endif]-->
</head>

<body>
<div class="container">

    <!--使用模态框的方式模拟一个登陆框-->
    <div class="modal show" id="loginModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <!--右上角，关闭按钮-->
                    <button type="button" class="close">&times;</button>
                    <!--标题-->
                    <h1 class="text-center text-primary">用户登录</h1>
                </div>
                <div class="modal-body">
                    <h3 class="text-center text-danger" th:text="${failedMsg}">错误的帐号或密码!</h3>
                    <form class="form center-block" action="../index.html" th:action="@{/signin}" th:object="${user}"
                          method="post">
                        <div class="form-group-lg">
                            <div class="input-group">
                                <div class="input-group-addon">
                                    <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                                </div>
                                <input class="form-control" th:field="*{userId}" name="userId" type="text"
                                       placeholder="帐号" required="required"/>
                            </div>
                        </div>
                        <div class="form-group-lg">
                            <div class="input-group">
                                <div class="input-group-addon">
                                    <span class="glyphicon glyphicon-lock"></span>
                                </div>
                                <input class="form-control" th:field="*{passWd}" name="passWd" type="password"
                                       placeholder="密码" required="required"/>
                            </div>
                        </div>
                        <br/>

                        <div class="btn-group btn-group-sm btn-group-justified" data-toggle="buttons">
                            <input class="hidden" id="isRmm" th:field="*{rmm}" name="rmm" value="true" title=""/>
                            <label class="btn btn-default active" onclick="$('#isRmm').val('true');">
                                <input type="radio" autocomplete="off" checked="checked"/> 记住我
                            </label>
                            <label class="btn btn-default" onclick="$('#isRmm').val('false');">
                                <input type="radio" autocomplete="off"/> 不要记住我
                            </label>
                        </div>
                        <br/>
                        <div class="btn-group btn-group-justified">
                            <div class="btn-group btn-group-lg">
                                <button type="submit" class="btn btn-primary btn-block">登陆</button>
                            </div>
                            <div class="btn-group btn-group-lg">
                                <button type="button" class="btn btn-success btn-block">新用户注册</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer"></div>
            </div>
        </div>
    </div>

</div>
<!-- /container -->

<!-- General JavaScript -->
<!-- jquery.js -->
<script type="text/javascript" src="../../static/plugins/js/jquery-3.1.1.min.js"
        th:src="@{plugins/js/jquery-3.1.1.min.js}"></script>

<!--Bootstrap-->
<script type="text/javascript" src="../../static/plugins/bootstrap/js/bootstrap.min.js"
        th:src="@{/plugins/bootstrap/js/bootstrap.min.js}"></script>

<!--Custom js-->
<script type="text/javascript" src="../../static/js/signin.js" th:src="@{/js/signin.js}"></script>

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script type="text/javascript" src="../../static/plugins/js/ie10-viewport-bug-workaround.js"
        th:src="@{/plugins/js/ie10-viewport-bug-workaround.js}"></script>

</body>

</html>